﻿<UserControl x:Class="HomeWP.SHUTTERCONTACT"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="99" d:DesignWidth="450" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:toolkitPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit"         
             >
    <UserControl.Resources>
     <!---   <Style x:Key="ToggleSwitchButtonStyle1" TargetType="toolkitPrimitives:ToggleSwitchButton">
            <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="SwitchForeground" Value="{StaticResource PhoneAccentBrush}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="toolkitPrimitives:ToggleSwitchButton">
                        <Border x:Name="Root" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CacheMode="BitmapCache" Opacity="{TemplateBinding Opacity}" Padding="{TemplateBinding Padding}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="{StaticResource PhoneForegroundColor}" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Storyboard.TargetName="SwitchBottom"/>
                                            <ColorAnimation Duration="0" To="{StaticResource PhoneForegroundColor}" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="ThumbCenter"/>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="CheckStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0:0:0.05" To="Unchecked"/>
                                        <VisualTransition GeneratedDuration="0:0:0.05" To="Checked"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Checked">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="69" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="BackgroundTranslation">
                                                <DoubleAnimation.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="15"/>
                                                </DoubleAnimation.EasingFunction>
                                            </DoubleAnimation>
                                            <DoubleAnimation Duration="0" To="69" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="ThumbTranslation">
                                                <DoubleAnimation.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="15"/>
                                                </DoubleAnimation.EasingFunction>
                                            </DoubleAnimation>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Dragging"/>
                                    <VisualState x:Name="Unchecked">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="BackgroundTranslation"/>
                                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="ThumbTranslation"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="SwitchRoot" Background="Transparent" Height="95" Width="136">
                                <Grid x:Name="SwitchTrack" Width="89">
                                    <Grid x:Name="SwitchBottom" Background="{TemplateBinding SwitchForeground}" Height="34">
                                        <Rectangle x:Name="SwitchBackground" Fill="{TemplateBinding Background}" HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Width="77">
                                            <Rectangle.RenderTransform>
                                                <TranslateTransform x:Name="BackgroundTranslation"/>
                                            </Rectangle.RenderTransform>
                                        </Rectangle>
                                        <Border BorderBrush="{StaticResource PhoneForegroundBrush}" BorderThickness="3">
                                            <Border BorderBrush="{StaticResource PhoneBackgroundBrush}" BorderThickness="4"/>
                                        </Border>
                                    </Grid>
                                    <Border x:Name="SwitchThumb" BorderBrush="{StaticResource PhoneBackgroundBrush}" BorderThickness="4,0" HorizontalAlignment="Left" Height="38" Margin="-4,0" Width="28">
                                        <Border.RenderTransform>
                                            <TranslateTransform x:Name="ThumbTranslation"/>
                                        </Border.RenderTransform>
                                        <Border x:Name="ThumbCenter" BorderBrush="{StaticResource PhoneForegroundBrush}" BorderThickness="2" Background="Black"/>
                                    </Border>
                                </Grid>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

-->
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Width="auto" Loaded="LayoutRoot_Loaded"  Margin="16,0,0,0" Height="100">
        <StackPanel>
            <TextBlock x:Name="tb_Caption" Style="{StaticResource PhoneTextGroupHeaderStyle}" ></TextBlock>
            <toolkit:ToggleSwitch  Name="toggleSwitch1"
                              IsEnabled="False" 
                               IsHitTestVisible="False" SwitchForeground="White" 
                               BorderBrush="#FF996161" 
                               Background="Black" Opacity="0.995" Margin="0,0,0,-2"   >
                <TextBlock x:Name="ts_Content" Margin="0,-20,0,0" FontSize="28">?</TextBlock>
            </toolkit:ToggleSwitch>

        </StackPanel>
        <toolkit:ContextMenuService.ContextMenu>
            <toolkit:ContextMenu IsZoomEnabled="false" Margin="0,-20,0,0">
                <toolkit:MenuItem Header="Als Favorit hinzufügen" x:Name="mi_Favorit" Click="mi_Favorit_Click" />
                <toolkit:MenuItem Header="Favorit entfernen" x:Name="mi_DelFavorit" Click="mi_DelFavorit_Click" />
                <!--    <toolkit:MenuItem Header="Auf Startseite anheften" x:Name="mi_Pin" Click="MenuItem2_Click" />-->
            </toolkit:ContextMenu>
        </toolkit:ContextMenuService.ContextMenu>
    </Grid>
</UserControl>
